#ifndef _MAIN_MENU_SCENE_
#define _MAIN_MENU_SCENE_

#include "aerial\Scene\Scene.h"

namespace air {
	class TextInput;
	class Text;
	class Button;

	class Panel;

	class IGuiObject;
};

using namespace air;

/**
 * @brief Scene when the game just started
 */
class MainMenuScene: public IScene
{
public:
	MainMenuScene()
	{
		onceConnected = false;
		createRoom = joinRoom = connectRoom = false;
		frameWidth = frameHeight = 0;
		flashWidth = flashHeight = 0;
		//status = 0;
		joinRoom = false;
		connectRoom = false;
		elmtCount = 1;

	};
	bool initialize();
	void Enter();
	void Leave();
	void CreateRoom();
	void Create();
	void CancelCreate();

	void JoinRoom();
	void ConnectRoom();
	void CancelJoinRoom();
	void Exit();
	
	bool update(float dt);
	bool render(float dt);
private:
	float frameWidth, frameHeight;
	float flashWidth, flashHeight;
	//int status;

	bool createRoom;
	bool joinRoom;
	bool connectRoom;
	bool onceConnected;

	Panel *menu;
	Panel *enterIP;
	Panel *enterUserName;
	Button *connectGame, *cancelJoin, *joinGame, *exitGame, *createGame, *create, *cancelCreate;
	TextInput* IPAddress, *usrName, *usrName2;
	Text *IPLabel, *nameLabel, *hint, *hint2, *nameLabel2;
};

#endif
